<template>
  <view class="successPage">
    <view class="head" :style="[{ height: customBar + 'px' }]">
      <u-navbar
        title="支付成功"
        :autoBack="true"
        :titleStyle="{ fontSize: '34rpx', fontWeight: '500' }"></u-navbar>
    </view>
    <view class="content">
      <image
        class="img"
        src="@/static/reservation/success.png"
        mode="widthFix"></image>
      <view class="name">支付成功</view>
      <view class="hite">您已完成支付</view>
      <view class="hite">谢谢您对向上生活的支持！</view>
      <view class="back" @click="handleBack">返回</view>
    </view>
  </view>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      customBar: 99,
      type: "",
    };
  },
  computed: mapGetters(["isLogin", "uid", "userInfo"]),
  onLoad(params) {
    this.type = params.type;
  },
  methods: {
    handleBack() {
      console.log(this.type);
      if (this.type) {
        uni.switchTab({
          url: "/pages/venue/index",
        });
      } else {
        uni.navigateTo({
          url: "/pages/reservation/activeRecord",
        });
      }
    },
  },
};
</script>

<style lang="scss">
.successPage {
  height: 100vh;
  font-family: PingFang SC;
  background: #fff;

  .head {
    background: #fff;
  }
  .content {
    height: 100vh;
    margin: 0 auto;
    width: 60%;
    .img {
      width: 264rpx;
      margin: 282rpx auto 10rpx;
      display: block;
    }
    .name {
      margin-top: 20rpx;
      font-weight: 500;
      font-size: 36rpx;
      color: #a3c616;
      text-align: center;
    }
    .hite {
      width: 100%;
      text-align: center;
      font-weight: 400;
      font-size: 26rpx;
      color: #999999;
      margin-top: 8rpx;
    }
    .back {
      width: 272rpx;
      height: 72rpx;
      border-radius: 36rpx;
      border: 2rpx solid #a3c616;
      font-weight: 400;
      font-size: 28rpx;
      color: #a3c616;
      display: flex;
      align-items: center;
      text-align: center;
      justify-content: center;
      margin: 56rpx auto 0;
    }
  }
}
</style>
